package com.example.endpoint;

import com.example.serviceapi.TestService1;
import com.example.serviceapi.TestService2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Wu Zhenwei
 * 2017/11/10
 */
@RestController
public class TestController {

    @Autowired
    private TestService1 service1;

    @Autowired
    private TestService2 service2;

    @GetMapping("test1")
    public String test1() throws Exception {
        return service1.test();
    }

    @GetMapping("test2")
    public String test2() throws Exception {
        return service2.test();
    }
}
